<template>
    <v-flex>
        <!--@click="$router.push({name:'talkDetail',params:{talk:talk}})"-->
        <v-card-text class="subheading py-0">{{talk.content}}</v-card-text>

        <v-card-text v-if="talk.imgList.length" class="py-2">
            <v-layout row wrap>
                <v-flex v-for="img in talk.imgList" xs4>
                    <v-img :src="$imgUrl+img.img" height="120px"></v-img>
                </v-flex>
            </v-layout>
        </v-card-text>

        <v-card-text v-if="talk.tags.length" class="py-2">
            <v-chip v-for="tag in talk.tags" dark
                    @click="chipTagClick(tag)"
            >
                <!--                                @click="tag.selected=!tag.selected"-->
                {{tag.name}}
            </v-chip>
        </v-card-text>
        <!--@click="$router.push({name:'talkDetail',params:{talk:talk}})"-->
        <v-card-actions class="pt-0">
            <!-- <div class="text-xs-center">
               <v-chip color="primary" small outline>王者荣耀</v-chip>

               <v-chip color="secondary" small outline>绝地求生</v-chip>

               <v-chip color="green" small outline>LOL</v-chip>
             </div>-->
            <v-spacer></v-spacer>
            <v-btn icon @click.stop="$store.commit('talk/setTalk',talk)">
                <v-icon>comment</v-icon>
                {{talk.comments.length}}
            </v-btn>
        </v-card-actions>


    </v-flex>
</template>

<script lang="ts">
    import {Vue, Component, Prop, Model} from 'vue-property-decorator'
    import {AxiosResponse} from "axios"
    import {RawLocation} from "vue-router"
    import Talk from "@/model/Talk"
    import {
        Action,
        namespace
    } from 'vuex-class'

    const talkModule = namespace('talk')

    @Component
    export default class TalkItemContent extends Vue {
        @Prop() talk: Talk

        /*chipTagClick(tag: Tag) {
            this.$store.commit('setCurrentTag',tag)
        }*/
    }
</script>

<!--<div v-if="tabBar===2" class="flex-row" style="width: 70px">
        <div class="row-all-center" style="width: 70px">
          <i @click="matchUser(talk.user.id,talk.talkId)"
             class="iconfont icon-favorites font-big"></i>
          <span style="margin-left: 2px">9999</span>
        </div>
      </div>-->
<!--<div class="row-all-center" style="width: 70px">
  <i @click="showCommentInput(talk,talk.talkId,talk.user.id,0)"
     class="iconfont icon-favorites"
     style="font-size: 18px;"></i>
  <span style="margin-left: 2px">9999</span>
</div>-->
